home *** CD-ROM | disk | FTP | other *** search
/ Celestin Apprentice 5 / Apprentice-Release5.iso / Demos / Bowers Development / AppMaker 2.0b5 / Examples / Java / Everything / View.java < prev   
Text File  |  1996-06-12  |  2KB  |  77 lines

  1.  
  2. import java.awt.Button;
  3. import java.awt.Checkbox;
  4. import java.awt.Choice;
  5. import java.awt.TextArea;
  6. import java.awt.List;
  7. import java.awt.Label;
  8. import java.awt.TextField;
  9.  
  10. import java.awt.Event;
  11. import RectPanel;
  12.  
  13. public class View extends RectPanel
  14. {
  15.     Button            mButtonButton;
  16.     Checkbox        mCheckboxCheck;
  17.     Choice            mPopupChoice;
  18.     TextArea        mTextAreaField;
  19.     List            mStylesList;
  20.     Label            mLabelLabel;
  21.     TextField        mTextFieldField;
  22.  
  23.     public View()
  24.     {
  25.         super();
  26.  
  27.         // BindingLayout b = new BindingLayout();
  28.             // BindingLayout is a LayoutManager
  29.             // that implements "binding" of components
  30.             // so that they resize when they container is resized.
  31.             // BindingLayout was written by a Roaster engineer
  32.             // and is not publicly available.
  33.             // If BindingLayout becomes publicly available
  34.             // then AppMaker will generate code for it.
  35.         // setLayout(b);
  36.         setLayout (null);
  37.  
  38.         resize(325, 214);
  39.  
  40.         add( mButtonButton = new Button("Button") );
  41.         mButtonButton.reshape( 20, 16, 72, 20);
  42.  
  43.         add( mCheckboxCheck = new Checkbox("Checkbox") );
  44.         mCheckboxCheck.reshape( 116, 20, 84, 16);
  45.  
  46.         add( mPopupChoice = new Choice() );
  47.         mPopupChoice.reshape( 216, 16, 100, 20);
  48.         mPopupChoice.addItem( "Choice");
  49.         mPopupChoice.addItem( "-");
  50.         mPopupChoice.addItem( "fred");
  51.         mPopupChoice.addItem( "george");
  52.         mPopupChoice.addItem( "harry");
  53.  
  54.         add (mTextAreaField = new TextArea ("TextArea"));
  55.         mTextAreaField.reshape (20, 60, 122, 83);
  56.  
  57.         add( mStylesList = new List() );
  58.         mStylesList.reshape( 168, 60, 120, 84);
  59.         mStylesList.addItem( "one");
  60.         mStylesList.addItem( "two");
  61.         mStylesList.addItem( "three");
  62.         mStylesList.addItem( "infinity");
  63.  
  64.         add( mLabelLabel = new Label("Label:") );
  65.         mLabelLabel.reshape( 80, 168, 42, 17);
  66.  
  67.         add (mTextFieldField = new TextField ("TextField"));
  68.         mTextFieldField.reshape (120, 168, 100, 16);
  69.                         
  70.     }
  71.  
  72.     public boolean action(Event e)
  73.     {
  74.         return false;
  75.     }
  76. }
  77.